package com.shujia.java.day8.demo;

public class Test {
    public static void main(String[] args) {
        //使用类 代码的重用
        Dog dog = new Dog("旺财",3,"黑白","哈士奇");
        dog.eat();
//      dog.setName("旺财");
//      dog.setAge(2);
//      dog.setColor("黑白");
//      dog.setVariety("哈士奇");

        System.out.println(dog.getName());
        System.out.println(dog.getVariety());
        //调用属性来输出 哈士奇在吃饭 和 雄性的麻雀在吃饭
        System.out.println("*********************************");
        Bird bird = new Bird("麻雀",2,"灰","雄");
        bird.eat();
    }
}
